home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / turbovis / tvtoys04.zip / TOYPREFS.PAS < prev    next >
Pascal/Delphi Source File  |  1993-12-15  |  7KB  |  199 lines

  1. (***************************************************************************
  2.   Preferences unit
  3.   Different TVToys constants to ease portability
  4.   PJB November 3, 1993, Internet mail to d91-pbr@nada.kth.se
  5.   Copyright 1993, All Rights Reserved
  6.   Free source, use at your own risk.
  7.   If modified, please state so if you pass this around.
  8. ***************************************************************************)
  9. unit toyPrefs;
  10.  
  11. interface
  12.  
  13. {$I toyCfg}
  14.  
  15.   uses
  16.     App, Drivers, Objects, Menus, Views;
  17.  
  18.  
  19.   (*******************************************************************
  20.     Useful for GetData/SetData dialog records
  21.   *******************************************************************)
  22.   type
  23.     TListboxRec =
  24.       record
  25.         List      : PCollection;
  26.         Selection : Word;
  27.       end;
  28.  
  29.  
  30.   const
  31.     (*******************************************************************
  32.       Registration numbers are numbers used in stream registration
  33.       records to uniquely identify objects stored on a stream.
  34.     *******************************************************************)
  35.     toyBaseRN            = 7380;
  36.     toyColorTxtRN        = toyBaseRN+0;
  37.     toyFileValidatorRN   = toyBaseRN+1;
  38.     toyFontFileRN        = toyBaseRN+2;
  39.     toyHexValidatorRN    = toyBaseRN+3;
  40.     toyPathValidatorRN   = toyBaseRN+4;
  41.     toyRealValidatorRN   = toyBaseRN+5;
  42.     toySelectFontRN      = toyBaseRN+6;
  43.     toySelectVideoModeRN = toyBaseRN+7;
  44.     toySliderValidatorRN = toyBaseRN+8;
  45.     toyVideoPaletteRN    = toyBaseRN+9;
  46.  
  47.  
  48. (***************************************************************************
  49.   toyApp constants
  50. ***************************************************************************)
  51.   const
  52.     hcHelpWindow      = 11111;  (* Popup help's HelpCtx (for status line) *)
  53.  
  54.     toyBaseCommand    = 9100;
  55.     cmHelp            = toyBaseCommand+0;
  56.     cmPreviousTopic   = toyBaseCommand+1;
  57.     cmHelpContents    = toyBaseCommand+2;
  58.     cmHelpOnHelp      = toyBaseCommand+3;
  59.  
  60.     (* You don't need to edit these values, you can override them with
  61.        your own HELPCTX file, see Help Contexts below *)
  62.     hcContents        = 0;
  63.     hcHelpOnHelp      = 2;
  64.  
  65.  
  66. (***************************************************************************
  67.   HelpFile
  68. ***************************************************************************)
  69.   const
  70.     (* MAGIC help topic, FF00+ reserved by Borland *)
  71.     PreviousTopic   = $EEEE;
  72.  
  73.     (* Doesn't have to be unique unless you use modeless help windows *)
  74.     cmSwitchToTopic = toyBaseCommand+9;
  75.  
  76.     (* Help topic back track depth *)
  77.     MaxOldTopics = 16;
  78.  
  79.  
  80.   (* Status line creation aid *)
  81.   function StdStatusHelp(Next:PStatusDef):PStatusDef;
  82.  
  83.  
  84. (***************************************************************************
  85.   ModeDlg
  86. ***************************************************************************)
  87.   const
  88.     (* Video mode selection preview time *)
  89.     PreviewTime = 12;                (* Two thirds of a second *)
  90.  
  91.     (* Maximum number of video modes stored *)
  92.     MaxVideoModes = 31;
  93.  
  94.  
  95. (***************************************************************************
  96.   FontDlg
  97. ***************************************************************************)
  98.   const
  99.     (* The key of a string collection resource containing all the
  100.        resource keys that are fonts (TFontFile) in that same RezFile *)
  101.     toyFontListKey = 'FONTLIST';
  102.     toyFontExt     : String[4] = '.COM';
  103.  
  104.  
  105. (***************************************************************************
  106.   ColorBox
  107. ***************************************************************************)
  108.   const
  109.     (* "Propagate colors" default setting *)
  110.     ColorPropagation : Boolean = True;
  111.  
  112.  
  113. (***************************************************************************
  114.   Help contexts
  115.   These are dummy values so you can get coding quickly, don't change them.
  116.   You should let TVHC generate these help contexts for you and put them
  117.   in a file called HELPCTX.PAS in your local project directory. You can
  118.   change the help context file name by editing HCFILE.PAS.
  119.   Your personal HELPCTX file will override any of the below values.
  120.   HELPTEST.TXT contains a topic list you can copy.
  121. ***************************************************************************)
  122.  
  123.   const
  124.     hcOK                           = 0;
  125.     hcCancel                       = 0;
  126.  
  127.     { Video Menu }
  128.     hcVideo                        = 0;
  129.     hctoyVVideoLines               = 0;
  130.     hctoyVVideoMode                = 0;
  131.     hctoyVSelectFont               = 0;
  132.     hctoyV14p                      = 0;
  133.     hctoyV16p                      = 0;
  134.     hctoyV8p                       = 0;
  135.  
  136.     { Video mode selection dialog }
  137.     hctoyVideoDialogHelp           = 0;
  138.     hctoyVideoListBox              = 0;
  139.     hctoyVideoPreview              = 0;
  140.     hctoyVideoRescan               = 0;
  141.  
  142.     { Otions Menu }
  143.     hctoyOVideoTests               = 0;
  144.  
  145.     { Video test dialog }
  146.     hctoyVTCheckVesa               = 0;
  147.     hctoyVTCheckV7                 = 0;
  148.     hctoyVTDialogHelp              = 0;
  149.  
  150.     { Font selection }
  151.     hctoyFontListBox               = 0;
  152.     hctoyFontDialogHelp            = 0;
  153.  
  154.     { Help Menu }
  155.     hcHelp                         = 0;
  156.     hctoyHHelp                     = 0;
  157.     hctoyHPreviousTopic            = 0;
  158.     hctoyHUsingHelp                = 0;
  159.  
  160.     { Color selection dialog }
  161.     hctoyCSBackground              = 0;
  162.     hctoyCSForeground              = 0;
  163.     hctoyCSGroup                   = 0;
  164.     hctoyCSItem                    = 0;
  165.     hctoyCSMonoSelector            = 0;
  166.     hctoyCSPropagation             = 0;
  167.  
  168.     { Video palette dialog }
  169.     hctoyVPBlue                    = 0;
  170.     hctoyVPGreen                   = 0;
  171.     hctoyVPRed                     = 0;
  172.     hctoyVPDialogHelp              = 0;
  173.  
  174.  
  175. (***************************************************************************
  176. ***************************************************************************)
  177. implementation
  178.  
  179.  
  180.   (*******************************************************************
  181.     Convenient status line creator
  182.   *******************************************************************)
  183.   function StdStatusHelp(Next:PStatusDef):PStatusDef;
  184.   begin
  185.     StdStatusHelp:=
  186.       NewStatusDef(hcHelpWindow, hcHelpWindow,
  187.         StdStatusKeys(
  188.         NewStatusKey('~F1~ Help on Help', kbF1,   cmHelpOnHelp,
  189.         NewStatusKey('~Alt+B~ Back',      kbAltB, cmPreviousTopic,
  190.         NewStatusKey('~Alt+C~ Contents',  kbAltC, cmHelpContents,
  191.         NewStatusKey('~F5~ Zoom',         kbF5,   cmZoom,
  192.         NewStatusKey('~Esc~ Close help',  kbEsc,  cmClose,
  193.       Nil)))))),
  194.     Next);
  195.   end;
  196.  
  197.  
  198. end.
  199.